package pw.goyd.game.model;

import pw.goyd.game.constant.setting.LuckyPool;

/**
 * 奖励物品
 * Created by StanWind on 16/11/5.
 */
public class LuckyAward implements LuckyPool {
    private LuckyType luckyType;        //  奖励类型
    private int value;                  //  奖励值
    private int weight;                 //  所占抽奖权重 影响概率

    public LuckyAward() {
        this(LuckyType.None, 0, 0);
    }

    public LuckyAward(LuckyType luckyType, int weight) {
        this(luckyType, 0, weight);
    }

    public LuckyAward(LuckyType luckyType, int value, int weight) {
        this.luckyType = luckyType;
        this.value = value;
        this.weight = weight;
    }

    public LuckyPool.LuckyType getLuckyType() {
        return luckyType;
    }

    public void setLuckyType(LuckyPool.LuckyType luckyType) {
        this.luckyType = luckyType;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public int getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }

    @Override
    public String toString() {
        return value + "\t" + luckyType.name() + "\t权重>" + weight;
    }
}
